<!-- listings/templates/listings/registration/register.html -->
{% extends "base.html" %}
{% load crispy_forms_tags %} <!-- 如果使用 crispy-forms, 先 pip install django-crispy-forms 并在 settings.py 中配置 -->

{% block title %}{{ page_title }}{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-6">
        <h2>{{ page_title }}</h2>
        <form method="post">
            {% csrf_token %}
            {{ form.as_p }} <!-- 将表单渲染为段落, 或者使用 crispy_forms: {{ form|crispy }} -->
            <button type="submit" class="btn btn-primary mt-3">注册</button>
        </form>
        <p class="mt-3">已经有账户了? <a href="{% url 'login' %}">点此登录</a></p>
    </div>
</div>
{% endblock %}